//
//  Response.swift
//
//
//  Created by Jiang Chencheng on 2024/8/30.
//

import Fluent
import Vapor


struct BizNil: Content {}

typealias BizVoid = BizNil

struct BizResponse<T: Content>: Content {

    var message: String
    var code: Int
    var data: T?
    
    init(message: String = "ok", status: Int = 0, data: T? = nil) {
        self.message = message
        self.code = status
        self.data = data
    }
    
    static func `default`() -> BizResponse {
        return BizResponse()
    }
}
